package cn.sinonet.sms.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.sinonet.sms.dao.FXTXDao;
import cn.sinonet.sms.model.FXTX;

@Service("fxtxManager")
public class FXTXManagerImp extends GenericManagerImp<FXTX, Long> implements
		FXTXManager {

	FXTXDao fxtxDao;

	public FXTXDao getFxtxDao() {
		return fxtxDao;
	}

	@Autowired
	public void setFxtxDao(FXTXDao fxtxDao) {
		this.dao = fxtxDao;
		this.fxtxDao = fxtxDao;
	}

	@Override
	public FXTX saveFXTX(FXTX fxtx) {
		return dao.save(fxtx);
	}

	public FXTX loadByMessageAndPhone(String message, String phone, String time) {
		return (FXTX) fxtxDao.loadByMessageAndPhone(message, phone, time);
	}

	@Override
	public FXTX loadByMessageAndPhone(String message, String phone) {
		return (FXTX) fxtxDao.loadByMessageAndPhone(message, phone);
	}

}
